﻿@model IEnumerable<QLTL_V2.Models.BuyPrice>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Sản Phẩm
        </th>
        <th>
            Loại Khách hàng
        </th>
        <th>
            Đơn Vị
        </th>
        <th>
            Giá
        </th>
        <th>
            Thời Gian
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Product.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CustomerType.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductUnit.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreatedTime)
        </td>
        <td>
            <div id="link_icon">
        <a href="@Url.Action("Edit", "BuyPrice", new { id = @item.BuyPriceId })"> <img src="../../Content/Images/edit-icon.png " height="25px" width="25px"/></a> 
        <a href="@Url.Action("Details", "BuyPrice", new { id = @item.BuyPriceId })"><img src="../../Content/Images/detail-icon.png" height="25px" width="25px" /></a> 
        <a href="@Url.Action("Delete", "BuyPrice", new { id = @item.BuyPriceId })"><img src="../../Content/Images/delete_icon.png" height="25px" width="25px"/></a> 

        </td>
    </tr>
}

</table>
